using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO
{
    /********************************BEGIN LichHocLopTinChiDAO****************************************/
    ///<summary>
    /// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
    /// <para>Date:07/10/2010 39:07:23</para>
    /// <para>Class Name: LichHocLopTinChiDAO</para>
    /// <para>Description: Class access to table LichHocLopTinChi in database. Class for coder code here</para>
    ///</summary>


    public partial class LichHocLopTinChiDAO
    {
        public DataSet SelectAllDSLichHocByListLop(List<int> ListLopTinChi_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT  MonHoc.MonHoc_ID,MonHoc.MaMonHoc,MonHoc.TenMonHoc,LopTinChi.MaLop,ThuTrongTuan.ThuTrongTuan_ID,ThuTrongTuan.MaThu,ThuTrongTuan.TenThu,ThuTrongTuan.ThuTu as ThuTuThu, PhongHoc.MaPhong, LichHocLopTinChi.LopTinChi_ID, PhongHoc.Tang, KhuNha.MaKhuNha, KhuNha.TenKhuNha, GiaoVien.HoTenGiaoVien, 
                                        TuanHoc.TenTuanHoc,TietHoc.TietHoc_ID,CaHoc.CaHoc_ID,CaHoc.MaCa,CaHoc.TenCa, TietHoc.TenTietHoc, TietHoc.MaTietHoc
                                FROM 
                                     MonHoc INNER JOIN  
                                     LopTinChi ON LopTinChi.MonHoc_ID=MonHoc.MonHoc_ID INNER JOIN   
                                     LichHocLopTinChi ON LichHocLopTinChi.LopTinChi_ID=LopTinChi.LopTinChi_ID INNER JOIN 
                                     TietHoc ON LichHocLopTinChi.TietHoc_ID = TietHoc.TietHoc_ID INNER JOIN
                                     CaHoc ON TietHoc.CaHoc_ID = CaHoc.CaHoc_ID LEFT JOIN
                                     TuanHoc ON LichHocLopTinChi.TuanHoc_ID = TuanHoc.TuanHoc_ID INNER JOIN
                                     ThuTrongTuan ON LichHocLopTinChi.ThuTrongTuan_ID = ThuTrongTuan.ThuTrongTuan_ID INNER JOIN
                                     PhongHoc ON LichHocLopTinChi.PhongHoc_ID = PhongHoc.PhongHoc_ID INNER JOIN
                                     KhuNha ON PhongHoc.KhuNha_ID = KhuNha.KhuNha_ID INNER JOIN
                                     GiangVienLopTinChi ON LichHocLopTinChi.GiangVienLopTinChi_ID = GiangVienLopTinChi.GiangVienLopTinChi_ID  INNER JOIN
                                     GiaoVien ON GiangVienLopTinChi.GiangVien_ID = GiaoVien.GiaoVien_ID 
                                WHERE LichHocLopTinChi.LopTinChi_ID IN(" + string.Join(",", ListLopTinChi_ID.ConvertAll<string>(Convert.ToString).ToArray()) + ")";
            return this.SelectDS(cmd);
        }

    }
    /*****************************************************************************************************/
    /**********************************END LichHocLopTinChiDAO*****************************************/
    /*****************************************************************************************************/
}

